<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="RepartoCreateDlg" widgetVar="RepartoCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{appBundle.CreateRepartoTitle}" closeOnEscape="true">

            <h:form id="RepartoCreateForm">

                <h:panelGroup id="display" rendered="#{repartoController.selected != null}">
                    <p:panelGrid columns="2" columnClasses="column">

                        <p:outputLabel value="#{appBundle.CreateRepartoLabel_repaCodigo2}" for="repaCodigo2" />
                        <p:inputText id="repaCodigo2" value="#{repartoController.selected.repaCodigo2}" title="#{appBundle.CreateRepartoTitle_repaCodigo2}" required="true" requiredMessage="#{appBundle.CreateRepartoRequiredMessage_repaCodigo2}" size="6" maxlength="6"/>

                        <p:outputLabel value="#{appBundle.CreateRepartoLabel_repRepaCodigo2}" for="repRepaCodigo2" />
                        <p:selectOneMenu id="repRepaCodigo2" value="#{repartoController.selected.repRepaCodigo2}">
                            <f:selectItems value="#{repartoController.items}" var="itemRep" itemValue="#{itemRep.repaCodigo2}" itemLabel="#{itemRep.repaDenominacion}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{appBundle.CreateRepartoLabel_repaDenominacion}" for="repaDenominacion" />
                        <p:inputText id="repaDenominacion" value="#{repartoController.selected.repaDenominacion}" title="#{appBundle.CreateRepartoTitle_repaDenominacion}" size="50" maxlength="50"/>

                        <p:outputLabel value="#{appBundle.CreateRepartoLabel_repaActi}" for="repaActi" />
                        <p:selectBooleanCheckbox id="repaActi" value="#{repartoController.selected.repaActi}" />
                    </p:panelGrid>
                    <p:commandButton actionListener="#{repartoController.saveNew}" value="#{appBundle.Save}" update="display,:RepartoListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,RepartoCreateDialog);">
                        <p:confirm header="#{appBundle.ConfirmationHeader}" message="#{appBundle.ConfirmCreateMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>

                    <p:commandButton value="#{appBundle.Cancel}" onclick="RepartoCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
